package com.addplus.townmall.server.api.service.web.questionModule;

import com.addplus.townmall.server.api.model.authority.User;
import com.addplus.townmall.server.api.model.exam.FilePath;
import com.addplus.townmall.server.api.model.exam.Question;
import com.addplus.townmall.server.api.model.exam.QuestionExt;
import com.alibaba.druid.wall.WallSQLException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.util.MultiValueMap;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import java.io.File;
import java.util.List;
import java.util.Map;

public interface QuestionService {

    /**
     * 选择题录入
     */
    Boolean addQuestion(Question question)throws Exception;

    /**
     * 修改试题
     * @param question
     * @return
     * @throws Exception
     */
    Boolean updateQuestion(Question question)throws Exception;

    /**
     * 查询所有题目
     */
    IPage<QuestionExt> getAllQuestionByPage(String content,Integer pageNo, Integer pageSize,String questionType)throws Exception;

    /**
     * 根据id查询试题
     * @param id
     * @return
     * @throws Exception
     */
    Question getQuestionById(Integer id)throws Exception;

    /**
     * 删除
     * @param id
     * @return
     * @throws Exception
     */
    Boolean deltetQuestion(Integer id)throws Exception;

    /**
     * 根据id导出试题
     * @param describe
     * @param idStr
     * @param paperName
     * @return
     * @throws Exception
     */
    Map<String,Object> exportQuestionByIds(String describe,String idStr,String paperName)throws Exception;



    List<QuestionExt> getQuestionByIds(String idsArr)throws Exception;
}
